import { debounce } from "common/utils"

export const imgListenerMixin = {
    data() {
        return {
            imgListener: null,
            newRefresh: null
        };
    },
    mounted() {
        this.newRefresh = debounce(this.$refs.scroll.refresh, 50);

        this.imgListener = () => {
            this.newRefresh()
        };
        this.$bus.$on("imageItemLoad", this.imgListener)
    },

}


export const backTopMixin = {


    data() {
        return {

            isShowBackTop: false,
        }
    },



    methods: {

        backTopClick() {

            this.$refs.scroll.scrollTo(0, 0);


        },




    }
}


